package eventos;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JOptionPane;

import vista.paneles.NoEsNodoPadre;
import vista.ventanas.SubVentanaConPanelAtributos;

public class EventoQuitarAtributo extends MouseAdapter {
	
	private SubVentanaConPanelAtributos ventana;
	
	public EventoQuitarAtributo(SubVentanaConPanelAtributos ventana)
	{
		super();
		this.ventana = ventana;
	}
	
	public void mouseClicked(MouseEvent e)
	{
		try
		{
			ventana.quitarAtributo();
		}
		catch (NoEsNodoPadre e1) 
		{
			JOptionPane.showMessageDialog(this.ventana, e1.getMessage(), "Error al borrar un Atributo", JOptionPane.ERROR_MESSAGE);
		}
	}	
}
